package org.ISCS.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName dockerfile
 */
@TableName(value ="dockerfile")
@Data
public class Dockerfile implements Serializable {
    /**
     * dockerfileid
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * dockerfile内容
     */
    private String dockerfileData;

    /**
     * dockerfile构建时间
     */
    private Date dockerfileCreateTime;

    /**
     * 所属服务id
     */
    private Long affiliateServiceId;

    /**
     * dockerfile创建状态
     */
    private Integer dockerfileStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dockerfile other = (Dockerfile) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDockerfileData() == null ? other.getDockerfileData() == null : this.getDockerfileData().equals(other.getDockerfileData()))
            && (this.getDockerfileCreateTime() == null ? other.getDockerfileCreateTime() == null : this.getDockerfileCreateTime().equals(other.getDockerfileCreateTime()))
            && (this.getAffiliateServiceId() == null ? other.getAffiliateServiceId() == null : this.getAffiliateServiceId().equals(other.getAffiliateServiceId()))
            && (this.getDockerfileStatus() == null ? other.getDockerfileStatus() == null : this.getDockerfileStatus().equals(other.getDockerfileStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDockerfileData() == null) ? 0 : getDockerfileData().hashCode());
        result = prime * result + ((getDockerfileCreateTime() == null) ? 0 : getDockerfileCreateTime().hashCode());
        result = prime * result + ((getAffiliateServiceId() == null) ? 0 : getAffiliateServiceId().hashCode());
        result = prime * result + ((getDockerfileStatus() == null) ? 0 : getDockerfileStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dockerfileData=").append(dockerfileData);
        sb.append(", dockerfileCreateTime=").append(dockerfileCreateTime);
        sb.append(", affiliateServiceId=").append(affiliateServiceId);
        sb.append(", dockerfileStatus=").append(dockerfileStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}